/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jigdo.concurrency;

/**
 *
 * @author John R Sohn
 */
public class ManualResetEvent {

    private boolean wait = false;
    public static int WaitMs = 10;

    public void set() {
        wait = false;
    }

    public void reset() {
        wait = true;
    }

    public void waitOne() {
        while (wait) {
            try {
                Thread.sleep(WaitMs);
            } catch (Exception e) {
            }
        }
    }
}
